Integrand size = 35, antiderivative size = 164 \[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\frac {A \sec ^{-n}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+n)}+\frac {(B+A n+B n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-n,-n,1-n,-\frac {2 \sec (c+d x)}{1-\sec (c+d x)}\right ) \sec ^{1-n}(c+d x) \left (\frac {1+\sec (c+d x)}{1-\sec (c+d x)}\right )^{\frac {1}{2}-n} (a+a \sec (c+d x))^n \sin (c+d x)}{d n (1+n) (1+\sec (c+d x))} \]
A*(a+a*sec(d*x+c))^n*sin(d*x+c)/d/(1+n)/(sec(d*x+c)^n)+(A*n+B*n+B)*hyperge om([-n, 1/2-n],[1-n],-2*sec(d*x+c)/(1-sec(d*x+c)))*sec(d*x+c)^(1-n)*((1+se c(d*x+c))/(1-sec(d*x+c)))^(1/2-n)*(a+a*sec(d*x+c))^n*sin(d*x+c)/d/n/(1+n)/ (1+sec(d*x+c))
Time = 0.84 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.68 \[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\frac {\left (A+\frac {(B+A n+B n) \left (-\cot ^2\left (\frac {1}{2} (c+d x)\right )\right )^{\frac {1}{2}-n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-n,-n,1-n,\csc ^2\left (\frac {1}{2} (c+d x)\right )\right )}{n (1+\cos (c+d x))}\right ) \sec ^{-n}(c+d x) (a (1+\sec (c+d x)))^n \sin (c+d x)}{d (1+n)} \]
((A + ((B + A*n + B*n)*(-Cot[(c + d*x)/2]^2)^(1/2 - n)*Hypergeometric2F1[1 /2 - n, -n, 1 - n, Csc[(c + d*x)/2]^2])/(n*(1 + Cos[c + d*x])))*(a*(1 + Se c[c + d*x]))^n*Sin[c + d*x])/(d*(1 + n)*Sec[c + d*x]^n)
Time = 0.62 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 4501, 3042, 4315, 3042, 4312, 142}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^{-n-1}(c+d x) (a \sec (c+d x)+a)^n (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n-1} \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^n \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4501 |
\(\displaystyle \frac {(A n+B n+B) \int \sec ^{-n}(c+d x) (\sec (c+d x) a+a)^ndx}{n+1}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A n+B n+B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^ndx}{n+1}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 4315 |
\(\displaystyle \frac {(A n+B n+B) (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \sec ^{-n}(c+d x) (\sec (c+d x)+1)^ndx}{n+1}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A n+B n+B) (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \csc \left (c+d x+\frac {\pi }{2}\right )^{-n} \left (\csc \left (c+d x+\frac {\pi }{2}\right )+1\right )^ndx}{n+1}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 4312 |
\(\displaystyle \frac {(A n+B n+B) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \int \frac {\sec ^{-n-1}(c+d x) (\sec (c+d x)+1)^{n-\frac {1}{2}}}{\sqrt {1-\sec (c+d x)}}d(1-\sec (c+d x))}{d (n+1) \sqrt {1-\sec (c+d x)}}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
\(\Big \downarrow \) 142 |
\(\displaystyle \frac {(A n+B n+B) \sin (c+d x) \sec ^{1-n}(c+d x) \left (\frac {\sec (c+d x)+1}{1-\sec (c+d x)}\right )^{\frac {1}{2}-n} (a \sec (c+d x)+a)^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2}-n,-n,1-n,-\frac {2 \sec (c+d x)}{1-\sec (c+d x)}\right )}{d n (n+1) (\sec (c+d x)+1)}+\frac {A \sin (c+d x) \sec ^{-n}(c+d x) (a \sec (c+d x)+a)^n}{d (n+1)}\) |
(A*(a + a*Sec[c + d*x])^n*Sin[c + d*x])/(d*(1 + n)*Sec[c + d*x]^n) + ((B + A*n + B*n)*Hypergeometric2F1[1/2 - n, -n, 1 - n, (-2*Sec[c + d*x])/(1 - S ec[c + d*x])]*Sec[c + d*x]^(1 - n)*((1 + Sec[c + d*x])/(1 - Sec[c + d*x])) ^(1/2 - n)*(a + a*Sec[c + d*x])^n*Sin[c + d*x])/(d*n*(1 + n)*(1 + Sec[c + d*x]))
3.3.76.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/((b*e - a*f)*(m + 1)))*Hypergeometric2F1[m + 1, -n, m + 2, (-(d*e - c*f))*((a + b*x)/((b*c - a*d)*(e + f*x)))])/((b*e - a*f)*((c + d*x)/((b*c - a*d)*(e + f *x))))^n, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[m + n + p + 2, 0] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[(-(a*(d/b))^n)*(Cot[e + f*x]/(a^(n - 2)*f*Sqrt [a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(a - x)^(n - 1) *((2*a - x)^(m - 1/2)/Sqrt[x]), x], x, a - b*Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && GtQ[a, 0] & & !IntegerQ[n] && GtQ[a*(d/b), 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^IntPart[m]*((a + b*Csc[e + f*x])^FracPart[m ]/(1 + (b/a)*Csc[e + f*x])^FracPart[m]) Int[(1 + (b/a)*Csc[e + f*x])^m*(d *Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^ 2, 0] && !IntegerQ[m] && !GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[(a*A*m - b*B*n)/(b*d*n) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1), x] , x] /; FreeQ[{a, b, d, e, f, A, B, m, n}, x] && NeQ[A*b - a*B, 0] && EqQ[a ^2 - b^2, 0] && EqQ[m + n + 1, 0] && !LeQ[m, -1]
\[\int \sec \left (d x +c \right )^{-1-n} \left (a +a \sec \left (d x +c \right )\right )^{n} \left (A +B \sec \left (d x +c \right )\right )d x\]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{-n - 1} \,d x } \]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{- n - 1}{\left (c + d x \right )}\, dx \]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{-n - 1} \,d x } \]
\[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{-n - 1} \,d x } \]
Timed out. \[ \int \sec ^{-1-n}(c+d x) (a+a \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{n+1}} \,d x \]